<extend name="common/base" />
<block name="resource">
    <link href="__ASSET__/Home/v4/src/css/home.css" rel="stylesheet">
    <link href="__ASSET__/Home/v4/src/css/explore.css" rel="stylesheet">
    <link href="__ASSET__/Home/v4/src/css/search_v4.css" rel="stylesheet">
    <link href="__ASSET__/Home/v4/src/css/user-center.css" rel="stylesheet">
    <link href="__ASSET__/Home/v4/src/css/favourVideo.css" rel="stylesheet">
    <link href="__ASSET__/Home/v4/src/css/videoCommon.css" rel="stylesheet">
    <link href="__ASSET__/Home/v4/src/css/other_person.css" rel="stylesheet">
    <style>
        .video-box{height:auto}
        .level{height:auto;width:auto}
        .share_box{position:absolute;padding:10px 0;width:210px;height:52px;background:#f2f2f2;right:50%;margin-right:-105px;top:-60px;box-shadow:2px 2px 5px #666;z-index:998;display:none}
        .share_box:before{border:none}
        .bdsharebuttonbox{top:0}
        .bdsharebuttonbox:before{width:0;height:0;content:"";border-top:solid 8px #f2f2f2;border-left:solid 8px transparent;border-right:solid 8px transparent;position:absolute;left:50%;bottom:-7px;margin-left:-4px}
        .level{width:40px;height:18px;background:#53e0c1;color:#fff;text-align:center;line-height:18px;border-radius:5px;display:inline-block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:12px;vertical-align:top;margin-top:2px}
    </style>
</block>
<block name="content">
  <!-- 显示视频区域播放 -->
  <div class="person_video" id="person_video"> 
  </div>
  <div class="person_info">
  	   <div class="person_info_area">
                <notempty name="user.background">
                    <div class="person_bg_area bg_area relative" style="background:url('{$user.background}') no-repeat  scroll 0 0 / 100% 100%;height:180px;">
                <else />
                    <div class="person_bg_area bg_area relative" style="background-size:100% 100%;">
                </notempty>
                <div class="profile_icon">
                    <div class="profile-avatar-img relative">
                        <img src="{$user.avatar|default='__ASSET__/Home/v4/src/images/avatar-mr.png'}" width="75" height="75">
                        <notempty name="user.auth">
                            <img class="newG-icon" style="border:none;" title="{$user.auth.name}" src="{$user.auth.pic}">
                        </notempty>
                    </div>
                </div>
                <div class="name">
                        <span class="level font12">Lv.{$user.level}</span>
                        <span class="nicheng font14">{$user.nickname}</span>
                        <switch name="user.gender">
                            <case value="男">
                                <img src="__ASSET__/Home/v4/src/images/sex.png" class="sex_img"/>
                            </case>
                            <case value="女">
                                <img src="__ASSET__/Home/v4/src/images/girl.png" class="sex_img"/>
                            </case>
                        </switch>
                </div>
                <ul class="mine font13">
                      <li>
                          <a href="javascript:;" title="粉丝">
                              <i class="mine-img1"></i>
                              <div class="mine-span overflow">
                                粉丝:<span class="fan_num">{$user.statis.fans|default=0}</span>
                              </div>
                          </a>
                      </li>
                      <li>
                          <a href="javascript:;" title="关注">
                              <i class="mine-img2"></i>
                              <div class="mine-span overflow">
                              关注:{$user.statis.follows|default=0}
                              </div>
                          </a>
                      </li>
                      <li>
                          <a href="javascript:;" title="游戏">
                              <i class="mine-img3"></i>
                              <div class="mine-span overflow">
                               游戏:{$user.statis.scribe|default=0}
                              </div>
                          </a>
                      </li>
               </ul> 
            </div>
            <div class="person_1">
                <ul>
                    <li class="first_li">
                         <div class="s_icon"><span class="icon"></span></div>
                         <p class="p_x">收获打赏：<span>{$statis.reward|default=0}</span></p>
                    </li>
                    <li>
                         <div class="s_icon"><span class="icon icon_1"></span></div>
                         <p class="p_x">被点赞：<span>{$statis.like|default=0}</span></p>
                    </li>
                </ul>
            </div>
  	   </div>
  </div>
  <div class="person_content">
        <div class="main container">
              <div class="main-right left">
                <div class="part1_left white-bg person_left_area person_left_area_1">
                  <p class="p_l_title">TA的视频<span>{$user.statis.videos|default=0}条动态</span></p>
                  <notempty name="videos">
                  <div class="content_area">
                       <ul class="content_area_ul content_person_area_ul"  >
                          <volist name="videos" id="month_videos">
                          <li>
                             <div class="time relative">
                                    <span class="icon absolute"></span>
                                    <span class="time_formate relative"><i></i>{$month_videos[0].create_month}</span>
                              </div>
                              <div class="video_con">
                                     <ul data-type="teams">
                                        <volist name="month_videos" id="video">
                                            <include file="Others/video_template" />
                                        </volist>
                                    </ul>
                              </div>
                           </li>
                          </volist>
                       </ul>
                       <div class="page">
                                  <ul>
                                  </ul>
                       </div>
                  </div>
                  <else />
                  <div class="empty_favour">
                        <div class="empty_favour_icon"></div>
                        <p  class="is_favour">TA暂时还没有视频</p>
                  </div>
                  </notempty>
                </div>
                <!-- 如果TA的视频为空,可以查看其它视频 -->
                <div class="part2_left white-bg person_left_area person_left_area_1">
                       <p class="p_l_title">其TA的视频</p>
                       <div class="video_con other_video_list">
                            <ul data-type="teams" class="other_video">
                                <volist name="recommend_videos" id="video">
                                    <li class="list-item relative video_play_ele alert_window" data-index={$video.id} data-id="{$video.id}">
                                        <div class="video_src_area item-play dark-bg" data-video="{$video.pre_uri}" style="height:137px;width:243px;overflow:hidden;"> 
                                            <img  src="__ASSET__/Home/v4/src/images/explore-default.jpg" class="lazy" data-original="{$video.thumb}">
                                        </div>
                                        <div class="video_text_con">
                                            <p class="video_text_title">{$video.title}</p>
                                            <p class="video_text_title_1">
                                                <span class="left" style="width:140px;">
                                                   {$video.play|default=0}观看 {$video.comments|default=0}评论
                                                </span>
                                                <span class="right">{$video.create_time|date="m-d H:i",###}</span>
                                            </p>
                                        </div>
                                    </li>
                                </volist>
                            </ul>
                      </div>
                </div>
              </div>
              <div class="main-left right person_left_area" style="box-shadow:none;width:295px;">
                  <div class="fav_area">
                       <ul>
                          <li class="fav_area_first relative follow_btn"><span></span>加关注</li>
                          <li class="fav_area_last relative" onclick="warning()"><span></span>私信TA</li>
                       </ul>
                  </div>
                  <div class="person_intro">
                       <div class="person_intro_info">
                             <div class="pserson_row">
                                  <span class="text_1 relative"><i class="p_icon"></i>简介</span>
                                  <p class="text_2">{$user.desc|default='这位玩家很懒，什么也没有留下'}</p>
                             </div>
                             <div class="pserson_row">
                                  <span class="text_1 relative"><i class="p_icon p_icon_1"></i>擅长游戏</span>
                                  <p class="text_2">
                                    <notempty name="user.game">
                                        <volist name="user.game" id="g">
                                            <span class="label_info">{$g}</span>
                                        </volist>
                                       <else/> 
                                         未填写
                                    </notempty>
                                  </p>
                             </div>
                             <div class="pserson_row">
                                  <span class="text_1 relative"><i class="p_icon p_icon_2"></i>现年</span>
                                  <p class="text_2">
                                     <notempty name="user.age">
                                          {$user.age}岁
                                        <else/>
                                           未填写
                                     </notempty>
                                  </p>
                             </div>
                             <div class="pserson_row">
                                  <span class="text_1 relative"><i class="p_icon p_icon_3"></i>星座</span>
                                  <p class="text_2">
                                       <notempty name="user.stars">
                                          {$user.stars}
                                        <else/>
                                           未填写
                                     </notempty>
                                  </p>
                             </div>
                             <div class="pserson_row">
                                  <span class="text_1 relative"><i class="p_icon p_icon_4"></i>爱好</span>
                                  <p class="text_2">
                                    <notempty name="interest">
                                         <volist name="interest" id="i">
                                              <span>{$i}</span>
                                          </volist>
                                       <else/> 
                                         未填写
                                    </notempty>
                                  </p>
                             </div>
                             <div class="pserson_row">
                                  <span class="text_1 relative"><i class="p_icon p_icon_5"></i>注册时间</span>
                                  <p class="text_2">{$user.reg_time|date="Y-m-d",###}</p>
                             </div>
                       </div>
                       <!-- 动态区域 -->
                       <notempty name="trade">
                         <div class="trend">
                               <p class="trend_title">TA的动态</p>
                               <ul class="trend_ul">
                                  <volist name="trade" id="t">
                                     <li>
                                         <p class="trend_li_title">{$t.user.nickname}上传了视频</p>
                                         <div class="trend_con">
                                               <div class="trend_img_show left relative  video_play_ele">
                                                   <div class="item-play dark-bg " data-video="{$t.pre_uri}">
                                                       <img src="__ASSET__/Home/v4/src/images/explore-default.jpg" class="lazy lazy_load"   data-original="{$t.thumb}" width="100%"  height="100%">
                                                   </div>
                                               </div>
                                               <div class="trend_text_show right">
                                                   <p class="trend_text_title"><a href="/video-{$t.id}">{$t.title}</a></p>
                                                   <p class="trend_text_upload_title">UP:<a href="javascript:;">{$t.user.nickname}</a></p>
                                               </div>
                                         </div>
                                     </li>
                                  </volist>
                               </ul>
                         </div>
                       </notempty>
                       <!-- 关注 -->
                       <div class="follow_div">
                          <p class="trend_title">关注</p>
                           <ul class="active-users-ul active-users-ul-contain search_contain_ul"> 
                           </ul>
                       </div>
                  </div>
              </div>
        </div>
        <div class="person_footer">
             <p>©2013 All Rights Reserved.版权所有.成都映霸龙渊文化传播有限公司 蜀ICP备16004268号</p>
             <p>联系电话：028-86734773   公司地址：成都高新区益州大道中段722号复城国际T1栋12楼</p>
        </div>
  </div>
  <include file="Explore/player_template"/>
</block>
<block name="footer"></block>
<block name="component">
    <script src="__ASSET__/Home/v4/lib/js/jwplayer.js"></script>
    <script src="__ASSET__/Home/v4/lib/js/jquery.zclip.min.js"></script>
    <script src="__ASSET__/Home/v4/lib/js/date_format.js"></script>
    <script src="__ASSET__/Home/v4/lib/js/face.js?v=1.0"></script>
   <script src="__ASSET__/Home/v4/dist/js/related_user.js"></script>
   <script src="__ASSET__/Home/v4/dist/js/HDvideo.js"></script>
   <script src="__ASSET__/Home/v4/dist/js/other_person.js"></script>
   <script src="__ASSET__/Home/v4/dist/js/team_window.js"></script>
   <script src="__ASSET__/Home/v4/dist/js/favourCommon.js"></script>
   <script>
   	   window._THIS = {
            searchUserApi : "/others/follow_users?uid={$user.id}",
            other:"/user-",
            unfollow:"{:U('follow/unfollow')}",
            dofollow:"{:U('follow/dofollow')}",
            list_url: '/others/index/uid/{$user.id}',
            videoInfoUrl: '{:U("video/info")}',
            VideoPlay:"{:C('LOCAL_DOMAIN')}/video-play-",
            getCommentList: "{:U('video/getCommentList')}",
            addComment : "{:U('video/comments')}",
            add : "{:U('favour/add')}",
            undo : "{:U('favour/undo')}",
            dolike : "{:U('like/dolike')}",
            unlike : "{:U('like/unlike')}",
            bg_video:"{$bg_video}",
            shareUrl : "/video-",
            p: {$p|default=1},
            pager: {$pager|default=10},
            total: {$total},
            create_month:true,
            type:1,
            page_type:'list',
            user: {$user|json_encode},
            shareType:1
   	   }
       $(function(){
           //加关注
           is_follow();
           $(".follow_btn").on('click',function(){
                    if(_COMMON.appToken==""){
                              tool.loginWindow();
                        }else{
                             var url=_THIS.user.action.is_follow==true?_THIS.unfollow:_THIS.dofollow;
                             $.get(url,{uid:_THIS.user.id},function(data){
                                  if(data.state==0){
                                        layer.msg(data.info);
                                        _THIS.user.action.is_follow=!_THIS.user.action.is_follow;
                                        $(".fan_num").html(data.data.total);
                                        var data_info=data.info=="关注成功"?'<span></span>已关注':'<span></span>加关注';
                                        $(".follow_btn").html(data_info);
                                  }
                             })
                    }
           })
       })
       function is_follow () {
          var follow_html=_THIS.user.action.is_follow==false?'<span></span>加关注':'<span></span>已关注';
              $(".follow_btn").html(follow_html);
            
       }
   </script>
</block>